!!! Strict
%html{ xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" }
	%head
		%title Hamlap demo page
		%meta { http-equiv="Content-Type" content="text/html;charset=utf-8" }
		%link { href="templates/stylesheet.css" rel="stylesheet" type="text/css" }

	%body
		#container
			%h1 Hamlap demo page
			.left#ham_image
				%img {src="templates/ham.png" alt="Ham" title="This is just an image of a ham..."}
			.right#intro
				%p 	With
					%abbr{title="Haml and PHP"} Hamlap
					you can use
					%a { href="http://haml-lang.com" title="Visit the Haml homepage" } Haml
					syntax with
					%a {href="http://php.net" title="Visit the PHP homepage"} PHP
					.
				%p	You can also
					%em echo
					PHP code from Haml, for example to show the date and time:
				%code
					= date('d-m-Y H:i:s');
				%p 	The code for the above line would be:
				%code %code- echo date('d-m-Y H:i:s');
				%p 	Or you could use shorthand notation, then it would look like:
				%code %code= date('d-m-Y H:i:s');
				%p	If you just want to execute PHP code without actually outputting something,
					you can use the '-' character at the start of a line to parse the
					text as PHP.

			.left#how_it_works
				%h2 How does it work?
				%p 	Hamlap makes use of
					%abbr{title="Regular expressions"} Regex
					to parse the Haml code and print it as HTML.
				%p 	When the entire code has been parsed it will be evaluated by PHP,
					so any PHP code that was in your template will be executed.

			.right#how_about_resources
				%h2 Isn't Hamlap resource consuming?
				%p	For a single page it doesn't matter that much,
					but for larger pages or sites - Zend Frameworks
					%abbr{title="Model-View-Controller"} MVC
					sites for example - Hamlap could be rather expensive if it needs to parse
					Haml files for every request.
				%p	Luckily Hamlap supports a basic compile option. Hamlap will parse the page once
					and then store it inside a folder as a HTML file. For every following request Hamlap
					will just serve the HTML file(s) and stop right there. Furthermore Hamlap is intelligent enough to
					detect changes in your Haml files and recompile them again if needed!
				%p 	Hamlap doesn't touch the PHP code, so all PHP code inside your Haml files
					will still be there in the compiled HTML file.

			.left#zend_framework_integration
				%h2	Can I use it with
					%a { href="http://framework.zend.com" title="Visit the Zend Framework homepage" } Zend Framework
					?
				%p	Yes you can! Hamlap comes with a class that extends
					%a { href="http://framework.zend.com/manual/en/zend.view.abstract.html" title="View Zend_View_Abstract specifications" } Zend_View_Abstract
					so it is ready to parse all Haml code inside your .phtml view scripts.